package com.qsl.ssyx.activity.mapper;

import com.qsl.ssyx.model.activity.CouponInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 优惠券信息 Mapper 接口
 * </p>
 *
 * @author 青衫泪
 * @since 2023-08-28
 */
public interface CouponInfoMapper extends BaseMapper<CouponInfo> {

    // skuId + 分类id + userId
    List<CouponInfo> getCouponInfoBySkuIdAndUserIdList(@Param("skuId") Long skuId,
                                                       @Param("categoryId") Long categoryId,
                                                       @Param("userId") Long userId);

    // 根据userId获取用户全部优惠卷： coupon_use连coupon_info
    List<CouponInfo> selectCartCouponInfoList(Long userId);
}
